package com.green.logging.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/test1")
@Slf4j
public class Test1Controller {

    @GetMapping
    public String method1(){
        log.info("info级别");
        log.error("error级别");
//        Arrays.asList(1,2,3).stream()
        int[] arr = {1,2,3};
        List<Integer> collect = Arrays.stream(arr).boxed().toList();
        return "日志打印";
    }
}
